<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus®">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>$工具方法</title>
  <script src="jquery-1.11.3.min.js"></script>
 </head>
 <body>
    
 </body>
 <script>
    var obj = {
	   name : "Tom",
	   age : 12,
	   setName : function(name){
	       this.name = name;
	   }
	}
	$.each(obj,function(key,value){
	   console.log(key+"---"+value);
	});

	var str1 = "  abc   ";
	var str2 = $.trim(str1);
	console.log(str1+"---"+str1.length);
	console.log(str2+"---"+str2.length);

	console.log($.type(obj));
	console.log($.type(str1));
	console.log($.type([]));
	console.log($.type($));

	console.log($.isArray(obj));
	console.log($.isArray([]));

	console.log($.isFunction(obj));
	console.log($.isFunction($));

    var json = '{"name":"tom","age":12}';
	console.log($.parseJSON(json));

 </script>
</html>
